//=============================================================================

#ifndef AGROUND_H
  #define AGROUND_H

//=============================================================================

#include "aSurface.h"
#include "aString.h"

//=============================================================================

enum agdRet
{
  GRO_DONE = -128,
  GRO_NULLED_PATH,
  GRO_CANT_LOAD_HEIGHT_MAP,
  GRO_CANT_COMPILE_NO_HEIGHTMAP,
};

//=============================================================================

class aGround : public aSurface, public aTexture
{
  public:
    aGround();
      agdRet agLoadHeightMapTGA(const aString& path);
      void agGenerateHeightMap(unsigned int x, unsigned int y, float step);
    ~aGround();

  private:
    agdRet agCompileByHeightMap(bool uv = 1);

  private:
    float xStep;
    float zStep;
    float heightLimit;
};

//=============================================================================

#endif

//=============================================================================
